package edu.zut.cs.software.cms.admin.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

import edu.zut.cs.software.cms.base.domain.BaseEntity;

@Entity
@Table(name = "T_ADMIN")
public class Admin extends BaseEntity<Long>{
	private static final long serialVersionUID = -3199029100807028476L;

	/**
	 * admin ID
	 */
	@Column
	String code;
	/**
	 * full name
	 */
	@Column
	String name;
	
	@ManyToOne
	@JoinColumn(name="ADMIN_CATEGORY_ID")
	@JsonIgnore
	AdminCategory adminCategory;
	
	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the adminCategory
	 */
	public AdminCategory getAdminCategory() {
		return adminCategory;
	}

	/**
	 * @param adminCategory the adminCategory to set
	 */
	public void setAdminCategory(AdminCategory adminCategory) {
		this.adminCategory = adminCategory;
	}

}
